3.8.41 \(\int x^{-2+n} (a+b x)^{-n} \, dx\) [741]

Optimal. Leaf size=28 \[ -\frac {x^{-1+n} (a+b x)^{1-n}}{a (1-n)} \]

[Out]

-x^(-1+n)*(b*x+a)^(1-n)/a/(1-n)

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {37} \begin {gather*} -\frac {x^{n-1} (a+b x)^{1-n}}{a (1-n)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^(-2 + n)/(a + b*x)^n,x]

[Out]

-((x^(-1 + n)*(a + b*x)^(1 - n))/(a*(1 - n)))

Rule 37

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^(n +
1)/((b*c - a*d)*(m + 1))), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[m + n + 2, 0] && NeQ
[m, -1]

Rubi steps

\begin {align*} \int x^{-2+n} (a+b x)^{-n} \, dx &=-\frac {x^{-1+n} (a+b x)^{1-n}}{a (1-n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 25, normalized size = 0.89 \begin {gather*} \frac {x^{-1+n} (a+b x)^{1-n}}{a (-1+n)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^(-2 + n)/(a + b*x)^n,x]

[Out]

(x^(-1 + n)*(a + b*x)^(1 - n))/(a*(-1 + n))

________________________________________________________________________________________

Maple [A]
time = 0.12, size = 29, normalized size = 1.04

method result size
gosper \(\frac {x^{-1+n} \left (b x +a \right ) \left (b x +a \right )^{-n}}{a \left (-1+n \right )}\) \(29\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(-2+n)/((b*x+a)^n),x,method=_RETURNVERBOSE)

[Out]

x^(-1+n)*(b*x+a)/a/(-1+n)/((b*x+a)^n)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-2+n)/((b*x+a)^n),x, algorithm="maxima")

[Out]

integrate(x^(n - 2)/(b*x + a)^n, x)

________________________________________________________________________________________

Fricas [A]
time = 1.12, size = 33, normalized size = 1.18 \begin {gather*} \frac {{\left (b x^{2} + a x\right )} x^{n - 2}}{{\left (a n - a\right )} {\left (b x + a\right )}^{n}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-2+n)/((b*x+a)^n),x, algorithm="fricas")

[Out]

(b*x^2 + a*x)*x^(n - 2)/((a*n - a)*(b*x + a)^n)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 85 vs. \(2 (19) = 38\).
time = 201.00, size = 85, normalized size = 3.04 \begin {gather*} \begin {cases} - \frac {1}{b x} & \text {for}\: a = 0 \wedge n = 1 \\- \frac {x^{n} \left (b x\right )^{- n}}{x} & \text {for}\: a = 0 \\\frac {\log {\left (x \right )}}{a} - \frac {\log {\left (\frac {a}{b} + x \right )}}{a} & \text {for}\: n = 1 \\\frac {a x^{n}}{a n x \left (a + b x\right )^{n} - a x \left (a + b x\right )^{n}} + \frac {b x x^{n}}{a n x \left (a + b x\right )^{n} - a x \left (a + b x\right )^{n}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**(-2+n)/((b*x+a)**n),x)

[Out]

Piecewise((-1/(b*x), Eq(a, 0) & Eq(n, 1)), (-x**n/(x*(b*x)**n), Eq(a, 0)), (log(x)/a - log(a/b + x)/a, Eq(n, 1
)), (a*x**n/(a*n*x*(a + b*x)**n - a*x*(a + b*x)**n) + b*x*x**n/(a*n*x*(a + b*x)**n - a*x*(a + b*x)**n), True))

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-2+n)/((b*x+a)^n),x, algorithm="giac")

[Out]

integrate(x^(n - 2)/(b*x + a)^n, x)

________________________________________________________________________________________

Mupad [B]
time = 0.35, size = 29, normalized size = 1.04 \begin {gather*} \frac {x^n\,\left (a+b\,x\right )}{a\,x\,\left (n-1\right )\,{\left (a+b\,x\right )}^n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(n - 2)/(a + b*x)^n,x)

[Out]

(x^n*(a + b*x))/(a*x*(n - 1)*(a + b*x)^n)

________________________________________________________________________________________